from rest_framework.pagination import PageNumberPagination


class MyPagination(PageNumberPagination):
    page_size = 10  # 每页显示的条数
    page_size_query_param = 'page_size'  # 用于设置每页显示条数的参数名
    page_query_param = 'page'  # 用于设置页码的参数名